home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / SOUND / MODPLAY.ARJ / MP.DOC < prev    next >
Text File  |  1991-04-22  |  13KB  |  291 lines

  1.                          _ __    _    __   _    ,
  2.                           )  ) _//   /  ) ' )  /    Amiga module player
  3.                   M O D  /--'  /    /--/   /  /     for a 10Mhz or faster
  4.                         /     /___ /  (_  (__/_     286+ PC
  5.                                            //
  6.                          Version 1.12     (/        (C) Mark J Cox 1991
  7.  
  8. ____________________________________________________________________________
  9. Contents:
  10.                 o What are modules
  11.                 o How to use MODPLAY
  12.                 o How to get modules & contact author
  13.            and  o How to make a D/A converter for 5 pounds
  14.                   that works with MODPLAY, PLAY and other software
  15. ____________________________________________________________________________
  16.  
  17. Introduction
  18. ------------
  19.  
  20.     Modplay allows you to play (most) Amiga soundtracker/noisetracker files
  21.     on a 286 or better PC (10Mhz or faster clock speed).  CGA minimum is 
  22.     required for the graphical display whilst playing, but no display at all 
  23.     is required just to play modules.  MODPLAY detects automatically if a 
  24.     module is corrupt, and detects if it is a 15 or 30 instrument module.
  25.  
  26. What are Modules?
  27. -----------------
  28.  
  29.     A module consists of 15 (or 30) sampled instruments and a four channel
  30.     music track.  By playing the instruments at different pitches a
  31.     soundtrack lasting many minutes can be produced.  The PC speaker is not
  32.     really up to handling modules, since in total we have a 10 bit sample
  33.     to be played, and the speaker can only handle 5 (with difficulty!).  A
  34.     D/A converter gives 8 and the stereo version gives effectively 9.
  35.  
  36. Implementation:
  37. ---------------
  38.  
  39.     MODPLAY implements all Amiga effects such as volume sliding, vibrato etc.
  40.     except for the looping which, although implemented as described in 
  41.     Soundtracker v3.0 (plays all the sample first, followed by the loop
  42.     the rest of the time) does not seem to work with some modules. (See bugs
  43.     section)
  44.  
  45. Instructions:
  46. -------------
  47.  
  48.     There are two ways of using MODPLAY - the first from the command line and 
  49.     the second in 'interactive mode'
  50.  
  51.     Command Line:
  52.     -------------
  53.  
  54.     From the command line a module can be played through any of the output
  55.     devices with or without a moving graph display.  The format is
  56.  
  57.     MODPLAY [/q] [/0..5] filename [.MOD]
  58.  
  59.     Items in [ ] are optional.   The /q if present tells MODPLAY not to
  60.     display any text and so the module will play without disturbing the
  61.     text display.  (You could use this in a game's title screen written
  62.     in C or Basic, by doing a system or shell command - MODPLAY exits when
  63.     a key is pressed).  The /number tells MODPLAY what hardware to play
  64.     the module through
  65.  
  66.     /0 is the PC Speaker
  67.     /1 is an D/A converter on printer port 1
  68.     /2 is                  on printer port 2
  69.     /3 is 2 D/A converters, one on port1 the other on port2 (gives stereo)
  70.     /4 is 2 D/A converters as above but giving mono.
  71.     /5 is a D/A converter on printer port 1 (thats on a video card)
  72.     /6 is a prototype board
  73.  
  74.     These are explained in more detail later on.
  75.  
  76.     Playing is stopped by pressing *any* key, or when the module is finished
  77.     (some modules loop around to the beggining again and so never finish)
  78.  
  79.     Interactive:
  80.     ------------
  81.  
  82.     Typing MODPLAY /i will scan the current directory for all module file. 
  83.     These are then displayed in a list.  The cursor keys, PgUp, PgDn, Home
  84.     and End allow you to select a module;  the 'c' key alters the destination
  85.     of the sample (like /0,/1.. above); the 's' key displays the samples that
  86.     make up the module; ESC key exits and pressing SPACE or RETURN will play
  87.     the highlighted module.
  88.     
  89. Source of Modules:
  90. ------------------
  91.  
  92.     There are many sources, Including myself.  Modules usually come archived
  93.     in LZH form, these can be unpacked with the LHARC program which can be
  94.     found on most MSDOS BBS's.  The files will usually unpack as 'mod.something'
  95.     and MSDOS cuts them short to 'mod.SOM' and it is best to rename these to 
  96.     'something.mod' so that MODPLAY will automatically detect them.
  97.  
  98. Speaker Routines:
  99. -----------------
  100.  
  101.     The PC Speaker routines I used in PLAY and RESPLAY were not good enough for
  102.     MODPLAY.  PLAY and RESPLAY worked by linearly assigning the 64 different
  103.     waves the speaker could produce to the 256 levels of sample.  Most of
  104.     MODPLAYs information is in the middle 30 or so levels, as its not very
  105.     often that all the four channels are at maximum volume together.  So I
  106.     have designed a new logarithmic table - this means that the sound will be
  107.     a little wierd from the speaker, but it is better than it was with the
  108.     PLAY algorithm.
  109.  
  110. Supported Hardware:
  111. -------------------
  112.  
  113.     MODPLAY will play modules through the PC Speaker as mentioned above, through
  114.     an D to A converter on any of the three possible parallel ports, in stereo
  115.     if you have an D to A converter on both LPT1 and LPT2 (this sounds really
  116.     good) and also through a prototype board (currently in development by
  117.     a friend - stereo replay and sampling).  
  118.  
  119. How to make a D/A converter for five pounds:
  120. --------------------------------------------
  121.  
  122.     A simple circuit for HiFi quality sound needs only a few components (and
  123.     this circuit will work with lots and lots of other software)
  124.  
  125.     You need:
  126.  
  127.     IC1 a ZN426E (about 3 pounds)
  128.     C1 a 10micro-farad electrolytic capacitor (10V or greater)
  129.     C2 a 4.7micro-farad electrolytic capacitor (10V or greater)
  130.     R1 a 380ohm resistor (any sort)
  131.     CON1 a phono socket
  132.     CON2 a 25 way male D-type connector (for your parrallel port)
  133.     A bit of 10 way cable - or 10 short wires.
  134.     1 roll of double sided sticky tape (how'd that get there?)
  135.     A +5v supply
  136.  
  137.     Connect the following pins of IC1 to the numbered pins of CON2 (should
  138.     be numbered on the socket).  
  139.  
  140.     IC1 - CON2      IC1 - CON2
  141.     3     9         12    5
  142.     2     8         11    4
  143.     1     7         10    3
  144.     13    6          9    2
  145.  
  146.     Connect 0v of your power supply to pin 25 of CON2, the ground connection
  147.     of CON1, pin 7 of IC1 and also the -ve side of C2.
  148.  
  149.     Connect +5v of your power supply to pin 14 IC1 and one end of the resistor
  150.  
  151.     IC1 pin 5 and 6 are joined together and also to the +ve side of C2 and the
  152.     other end of the resistor.  
  153.  
  154.     IC1 pin 4 is connected to the +ve side of C1, the -ve side being connected
  155.     to the centre connection of the phono socket CON1.
  156.  
  157.     Every pin except pin 8 of IC1 should now be connected somewhere. Connect
  158.     a +5v power supply, attach to a parallel port and plug in your amplifier
  159.     to the phono socket.
  160.  
  161.     Filter?
  162.     -------
  163.  
  164.     Usually you would put a filter, buffer and amplifier after the D/A
  165.     converter - but I have had no problems without and it sounds great to
  166.     me.
  167.  
  168.     Getting a +5v power supply
  169.     --------------------------
  170.  
  171.     Catalogues such as MAPLIN (uk) provide simple circuits for obtaining
  172.     a +5v power supply (it only has to be 100mA maximum).  Alternatively
  173.     you could tap +5v off the keyboard connector or use 3 1.5volt
  174.     batteries (or even 4 1.5volt batteries with two diodes in series to
  175.     drop the voltage).  In fact, anything that produces a voltage in the
  176.     range 4.5 - 5.5 volts.
  177.  
  178. Freeware:
  179. ---------
  180.  
  181.     This software is Freeware - that means that there is no registration fee,
  182.     you can copy this software, give it to anyone, and use it for anything 
  183.     (subject to the license at the end of this document).  If you like this
  184.     software, and would like the author to continue writing a gift would be
  185.     appreciated.  For gifts of 10 UK pounds or greater I will send a package
  186.     of the full circuit diagrams for sampling as well as the playback mentioned
  187.     here,  printed documentation for PLAY, RESPLAY and MODPLAY and two disks
  188.     with Samples and the latest versions of the programs.
  189.     
  190.     If you want to save the hassle of collecting, unpacking and renaming
  191.     modules, I am willing to supply from my collection of nearly 15Meg of
  192.     modules.  If you wish me to send you one, or more disks please
  193.     enclose a gift of:  2 pounds post and packing (non-UK 3 pounds) and then
  194.     1 pound for each High Density disk you require.  Or send an SAE for a list
  195.     of all current disks and their contents.
  196.     
  197.     All disks branded, High Density 3.5" (1.4Meg)
  198.     
  199.     Disk 1.           Latest versions of PLAY, RESPLAY and MODPLAY
  200.     Disk 2,3,4,5,6,7.  Various Tracker modules
  201.     
  202.     My address is at the end of this document. PS It took me 9 solid days
  203.     to write this, and 3 hours to document - I hope this makes you feel
  204.     guilty :-)
  205.     
  206. Credits:
  207. --------
  208.  
  209.     Many thanks must go to Mahoney & Kaktus for their Amiga assembler 
  210.     noisetracker replay routine which provided much inspiration and 
  211.     help with the module format and effects.
  212.  
  213. Bugs:
  214. -----
  215.  
  216.     Will not load modules that have samples greater than 64k.  I have found
  217.     that this only applies to about 5% of modules.  I wrote the routine to
  218.     be quick and at the time was told the maximum in a module was 64k, I later
  219.     found that that the maximum was 128k and this would mean a rewrite of two
  220.     essential routines.  I will get round to it eventually. The LOOP effect
  221.     seems to work on most modules - some modules it doesn't.  I'm looking into
  222.     this one.
  223.  
  224. Coming Soon:
  225. ------------
  226.    
  227.     Playing modules that have large samples in them
  228.     A routine you can link into your own C programs to play modules 
  229.     Fast forward/Rewind and Skip whilst playing a module
  230.     Random 'Shuffle' play of all modules in a directory
  231.     
  232. _____________________________________________________________________________
  233.  
  234. Copyright/License/Warranty
  235. --------------------------
  236.  
  237.     This document and the program file MODPLAY.COM ("the software") are
  238.     copyrighted by the author.  The copyright owner hereby licenses
  239.     you to: use the software; make as many copies of the program
  240.     and documentation as you wish; give such copies to anyone; and
  241.     distribute the software and documentation via electronic means.
  242.     There is no charge for any of the above.
  243.     
  244.     You are specifically prohibited from charging, or requesting
  245.     donations, for any such copies, however made; and from
  246.     distributing the software and/or documentation with commercial
  247.     products without prior permission.
  248.     
  249.     NO FOR-PROFIT ORGANIZATION IS AUTHORIZED TO CHARGE ANY AMOUNT
  250.     FOR DISTRIBUTION OF COPIES OF THE SOFTWARE OR DOCUMENTATION,
  251.     OR TO INCLUDE COPIES OF THE SOFTWARE OR DOCUMENTATION WITH SALES
  252.     OF THEIR OWN PRODUCTS.
  253.     
  254.     THIS INCLUDES A SPECIFIC PROHIBITION AGAINST FOR-PROFIT
  255.     ORGANIZATIONS DISTRIBUTING THE SOFTWARE, EITHER ALONE OR WITH
  256.     OTHER SOFTWARE, AND CHARGING A "HANDLING" OR "MATERIALS" FEE OR
  257.     ANY OTHER SUCH FEE FOR THE DISTRIBUTION.  NO FOR-PROFIT
  258.     ORGANIZATION IS AUTHORIZED TO INCLUDE THE SOFTWARE ON ANY MEDIA
  259.     FOR WHICH MONEY IS CHARGED WITHOUT PRIOR PERMISSION FROM THE
  260.     COPYRIGHT OWNER.
  261.     
  262.     No copy of the software may be distributed or given away without
  263.     this document; and neither the program or document may be altered
  264.     in any way.
  265.     
  266.     There is no warranty of any kind, and the copyright owner is not
  267.     liable for damages of any kind.  By using this free software,
  268.     you agree to this.
  269.     
  270.     The software and documentation are:
  271.  
  272.     Copyright (C) 1990/1991       Mark J Cox
  273.  
  274.     All trademarks/registered names acknowledged.
  275. _____________________________________________________________________________
  276.     
  277. Address:
  278. --------
  279.  
  280.     Mark J Cox                 Electronic Mail: 
  281.     29 Lundie Close             (JANET) mjhc8@uk.ac.bradford.eleceng
  282.     Stenson Fields                      mjhc8@eleceng.bradford.ac.uk (non UK)
  283.     Derby                       (NETMAIL) Mark Cox  2:250/404.5
  284.     DE2 3AN                             (Kingdom of Greyhawk BBS)
  285.                                 (OR)    Mark.Cox@f404.n250.z2.fidonet.org
  286.     
  287.     (Or if before July 1991, 17 Kirkburn Place, Bradford, W Yorks BD7 2BZ 
  288.     is slightly quicker)
  289.  
  290.     All comments on PLAY, RESPLAY, MODPLAY or future software is welcomed!
  291.